package com.zzyl.nursing.controller.memberConteoller;


import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.service.member.IMemberNursingProject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 微信小程序 项目管理
 *
 * @author yhy
 * @date 2025/9/25
 */
@RestController
@RequestMapping("/member/orders/project")
public class MemberNursingProjectController extends BaseController {

    @Autowired
    private IMemberNursingProject memberNursingProject;


    @GetMapping("/page")
    public TableDataInfo page(NursingProject nursingProject) {
        startPage();
        List<NursingProject> list = memberNursingProject.selectNursingList(nursingProject);
        return getDataTable(list);
    }

    @GetMapping("/{id}")
    public AjaxResult getById(@PathVariable("id") Long id) {
        NursingProject nursingProject = memberNursingProject.getById(id);
        return success(nursingProject);
    }
}
